/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.protobuf = (function() {

    /**
     * Namespace protobuf.
     * @exports protobuf
     * @namespace
     */
    var protobuf = {};

    protobuf.C2S_Login = (function() {

        /**
         * Properties of a C2S_Login.
         * @memberof protobuf
         * @interface IC2S_Login
         * @property {string|null} [account] C2S_Login account
         * @property {string|null} [password] C2S_Login password
         */

        /**
         * Constructs a new C2S_Login.
         * @memberof protobuf
         * @classdesc Represents a C2S_Login.
         * @implements IC2S_Login
         * @constructor
         * @param {protobuf.IC2S_Login=} [properties] Properties to set
         */
        function C2S_Login(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_Login account.
         * @member {string} account
         * @memberof protobuf.C2S_Login
         * @instance
         */
        C2S_Login.prototype.account = "";

        /**
         * C2S_Login password.
         * @member {string} password
         * @memberof protobuf.C2S_Login
         * @instance
         */
        C2S_Login.prototype.password = "";

        /**
         * Creates a new C2S_Login instance using the specified properties.
         * @function create
         * @memberof protobuf.C2S_Login
         * @static
         * @param {protobuf.IC2S_Login=} [properties] Properties to set
         * @returns {protobuf.C2S_Login} C2S_Login instance
         */
        C2S_Login.create = function create(properties) {
            return new C2S_Login(properties);
        };

        /**
         * Encodes the specified C2S_Login message. Does not implicitly {@link protobuf.C2S_Login.verify|verify} messages.
         * @function encode
         * @memberof protobuf.C2S_Login
         * @static
         * @param {protobuf.IC2S_Login} message C2S_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_Login.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.account != null && Object.hasOwnProperty.call(message, "account"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
            if (message.password != null && Object.hasOwnProperty.call(message, "password"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.password);
            return writer;
        };

        /**
         * Encodes the specified C2S_Login message, length delimited. Does not implicitly {@link protobuf.C2S_Login.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.C2S_Login
         * @static
         * @param {protobuf.IC2S_Login} message C2S_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_Login.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_Login message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.C2S_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.C2S_Login} C2S_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_Login.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.C2S_Login();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.account = reader.string();
                    break;
                case 2:
                    message.password = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_Login message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.C2S_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.C2S_Login} C2S_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_Login.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_Login message.
         * @function verify
         * @memberof protobuf.C2S_Login
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_Login.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.account != null && message.hasOwnProperty("account"))
                if (!$util.isString(message.account))
                    return "account: string expected";
            if (message.password != null && message.hasOwnProperty("password"))
                if (!$util.isString(message.password))
                    return "password: string expected";
            return null;
        };

        /**
         * Creates a C2S_Login message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.C2S_Login
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.C2S_Login} C2S_Login
         */
        C2S_Login.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.C2S_Login)
                return object;
            var message = new $root.protobuf.C2S_Login();
            if (object.account != null)
                message.account = String(object.account);
            if (object.password != null)
                message.password = String(object.password);
            return message;
        };

        /**
         * Creates a plain object from a C2S_Login message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.C2S_Login
         * @static
         * @param {protobuf.C2S_Login} message C2S_Login
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_Login.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.account = "";
                object.password = "";
            }
            if (message.account != null && message.hasOwnProperty("account"))
                object.account = message.account;
            if (message.password != null && message.hasOwnProperty("password"))
                object.password = message.password;
            return object;
        };

        /**
         * Converts this C2S_Login to JSON.
         * @function toJSON
         * @memberof protobuf.C2S_Login
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_Login.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return C2S_Login;
    })();

    protobuf.S2C_Login = (function() {

        /**
         * Properties of a S2C_Login.
         * @memberof protobuf
         * @interface IS2C_Login
         * @property {string|null} [account] S2C_Login account
         * @property {string|null} [password] S2C_Login password
         */

        /**
         * Constructs a new S2C_Login.
         * @memberof protobuf
         * @classdesc Represents a S2C_Login.
         * @implements IS2C_Login
         * @constructor
         * @param {protobuf.IS2C_Login=} [properties] Properties to set
         */
        function S2C_Login(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_Login account.
         * @member {string} account
         * @memberof protobuf.S2C_Login
         * @instance
         */
        S2C_Login.prototype.account = "";

        /**
         * S2C_Login password.
         * @member {string} password
         * @memberof protobuf.S2C_Login
         * @instance
         */
        S2C_Login.prototype.password = "";

        /**
         * Creates a new S2C_Login instance using the specified properties.
         * @function create
         * @memberof protobuf.S2C_Login
         * @static
         * @param {protobuf.IS2C_Login=} [properties] Properties to set
         * @returns {protobuf.S2C_Login} S2C_Login instance
         */
        S2C_Login.create = function create(properties) {
            return new S2C_Login(properties);
        };

        /**
         * Encodes the specified S2C_Login message. Does not implicitly {@link protobuf.S2C_Login.verify|verify} messages.
         * @function encode
         * @memberof protobuf.S2C_Login
         * @static
         * @param {protobuf.IS2C_Login} message S2C_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_Login.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.account != null && Object.hasOwnProperty.call(message, "account"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
            if (message.password != null && Object.hasOwnProperty.call(message, "password"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.password);
            return writer;
        };

        /**
         * Encodes the specified S2C_Login message, length delimited. Does not implicitly {@link protobuf.S2C_Login.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.S2C_Login
         * @static
         * @param {protobuf.IS2C_Login} message S2C_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_Login.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_Login message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.S2C_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.S2C_Login} S2C_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_Login.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.S2C_Login();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.account = reader.string();
                    break;
                case 2:
                    message.password = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_Login message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.S2C_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.S2C_Login} S2C_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_Login.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_Login message.
         * @function verify
         * @memberof protobuf.S2C_Login
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_Login.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.account != null && message.hasOwnProperty("account"))
                if (!$util.isString(message.account))
                    return "account: string expected";
            if (message.password != null && message.hasOwnProperty("password"))
                if (!$util.isString(message.password))
                    return "password: string expected";
            return null;
        };

        /**
         * Creates a S2C_Login message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.S2C_Login
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.S2C_Login} S2C_Login
         */
        S2C_Login.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.S2C_Login)
                return object;
            var message = new $root.protobuf.S2C_Login();
            if (object.account != null)
                message.account = String(object.account);
            if (object.password != null)
                message.password = String(object.password);
            return message;
        };

        /**
         * Creates a plain object from a S2C_Login message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.S2C_Login
         * @static
         * @param {protobuf.S2C_Login} message S2C_Login
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_Login.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.account = "";
                object.password = "";
            }
            if (message.account != null && message.hasOwnProperty("account"))
                object.account = message.account;
            if (message.password != null && message.hasOwnProperty("password"))
                object.password = message.password;
            return object;
        };

        /**
         * Converts this S2C_Login to JSON.
         * @function toJSON
         * @memberof protobuf.S2C_Login
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_Login.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return S2C_Login;
    })();

    protobuf.S2C_LoginOut = (function() {

        /**
         * Properties of a S2C_LoginOut.
         * @memberof protobuf
         * @interface IS2C_LoginOut
         * @property {string|null} [account] S2C_LoginOut account
         */

        /**
         * Constructs a new S2C_LoginOut.
         * @memberof protobuf
         * @classdesc Represents a S2C_LoginOut.
         * @implements IS2C_LoginOut
         * @constructor
         * @param {protobuf.IS2C_LoginOut=} [properties] Properties to set
         */
        function S2C_LoginOut(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_LoginOut account.
         * @member {string} account
         * @memberof protobuf.S2C_LoginOut
         * @instance
         */
        S2C_LoginOut.prototype.account = "";

        /**
         * Creates a new S2C_LoginOut instance using the specified properties.
         * @function create
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {protobuf.IS2C_LoginOut=} [properties] Properties to set
         * @returns {protobuf.S2C_LoginOut} S2C_LoginOut instance
         */
        S2C_LoginOut.create = function create(properties) {
            return new S2C_LoginOut(properties);
        };

        /**
         * Encodes the specified S2C_LoginOut message. Does not implicitly {@link protobuf.S2C_LoginOut.verify|verify} messages.
         * @function encode
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {protobuf.IS2C_LoginOut} message S2C_LoginOut message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_LoginOut.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.account != null && Object.hasOwnProperty.call(message, "account"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
            return writer;
        };

        /**
         * Encodes the specified S2C_LoginOut message, length delimited. Does not implicitly {@link protobuf.S2C_LoginOut.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {protobuf.IS2C_LoginOut} message S2C_LoginOut message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_LoginOut.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_LoginOut message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.S2C_LoginOut} S2C_LoginOut
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_LoginOut.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.S2C_LoginOut();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.account = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_LoginOut message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.S2C_LoginOut} S2C_LoginOut
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_LoginOut.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_LoginOut message.
         * @function verify
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_LoginOut.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.account != null && message.hasOwnProperty("account"))
                if (!$util.isString(message.account))
                    return "account: string expected";
            return null;
        };

        /**
         * Creates a S2C_LoginOut message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.S2C_LoginOut} S2C_LoginOut
         */
        S2C_LoginOut.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.S2C_LoginOut)
                return object;
            var message = new $root.protobuf.S2C_LoginOut();
            if (object.account != null)
                message.account = String(object.account);
            return message;
        };

        /**
         * Creates a plain object from a S2C_LoginOut message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.S2C_LoginOut
         * @static
         * @param {protobuf.S2C_LoginOut} message S2C_LoginOut
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_LoginOut.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.account = "";
            if (message.account != null && message.hasOwnProperty("account"))
                object.account = message.account;
            return object;
        };

        /**
         * Converts this S2C_LoginOut to JSON.
         * @function toJSON
         * @memberof protobuf.S2C_LoginOut
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_LoginOut.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return S2C_LoginOut;
    })();

    protobuf.C2S_RoleInfo = (function() {

        /**
         * Properties of a C2S_RoleInfo.
         * @memberof protobuf
         * @interface IC2S_RoleInfo
         * @property {number|null} [hp] C2S_RoleInfo hp
         * @property {number|null} [posx] C2S_RoleInfo posx
         * @property {number|null} [posy] C2S_RoleInfo posy
         */

        /**
         * Constructs a new C2S_RoleInfo.
         * @memberof protobuf
         * @classdesc Represents a C2S_RoleInfo.
         * @implements IC2S_RoleInfo
         * @constructor
         * @param {protobuf.IC2S_RoleInfo=} [properties] Properties to set
         */
        function C2S_RoleInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_RoleInfo hp.
         * @member {number} hp
         * @memberof protobuf.C2S_RoleInfo
         * @instance
         */
        C2S_RoleInfo.prototype.hp = 0;

        /**
         * C2S_RoleInfo posx.
         * @member {number} posx
         * @memberof protobuf.C2S_RoleInfo
         * @instance
         */
        C2S_RoleInfo.prototype.posx = 0;

        /**
         * C2S_RoleInfo posy.
         * @member {number} posy
         * @memberof protobuf.C2S_RoleInfo
         * @instance
         */
        C2S_RoleInfo.prototype.posy = 0;

        /**
         * Creates a new C2S_RoleInfo instance using the specified properties.
         * @function create
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {protobuf.IC2S_RoleInfo=} [properties] Properties to set
         * @returns {protobuf.C2S_RoleInfo} C2S_RoleInfo instance
         */
        C2S_RoleInfo.create = function create(properties) {
            return new C2S_RoleInfo(properties);
        };

        /**
         * Encodes the specified C2S_RoleInfo message. Does not implicitly {@link protobuf.C2S_RoleInfo.verify|verify} messages.
         * @function encode
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {protobuf.IC2S_RoleInfo} message C2S_RoleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_RoleInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hp != null && Object.hasOwnProperty.call(message, "hp"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hp);
            if (message.posx != null && Object.hasOwnProperty.call(message, "posx"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.posx);
            if (message.posy != null && Object.hasOwnProperty.call(message, "posy"))
                writer.uint32(/* id 3, wireType 5 =*/29).float(message.posy);
            return writer;
        };

        /**
         * Encodes the specified C2S_RoleInfo message, length delimited. Does not implicitly {@link protobuf.C2S_RoleInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {protobuf.IC2S_RoleInfo} message C2S_RoleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_RoleInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_RoleInfo message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.C2S_RoleInfo} C2S_RoleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_RoleInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.C2S_RoleInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hp = reader.int32();
                    break;
                case 2:
                    message.posx = reader.float();
                    break;
                case 3:
                    message.posy = reader.float();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_RoleInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.C2S_RoleInfo} C2S_RoleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_RoleInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_RoleInfo message.
         * @function verify
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_RoleInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hp != null && message.hasOwnProperty("hp"))
                if (!$util.isInteger(message.hp))
                    return "hp: integer expected";
            if (message.posx != null && message.hasOwnProperty("posx"))
                if (typeof message.posx !== "number")
                    return "posx: number expected";
            if (message.posy != null && message.hasOwnProperty("posy"))
                if (typeof message.posy !== "number")
                    return "posy: number expected";
            return null;
        };

        /**
         * Creates a C2S_RoleInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.C2S_RoleInfo} C2S_RoleInfo
         */
        C2S_RoleInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.C2S_RoleInfo)
                return object;
            var message = new $root.protobuf.C2S_RoleInfo();
            if (object.hp != null)
                message.hp = object.hp | 0;
            if (object.posx != null)
                message.posx = Number(object.posx);
            if (object.posy != null)
                message.posy = Number(object.posy);
            return message;
        };

        /**
         * Creates a plain object from a C2S_RoleInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.C2S_RoleInfo
         * @static
         * @param {protobuf.C2S_RoleInfo} message C2S_RoleInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_RoleInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.hp = 0;
                object.posx = 0;
                object.posy = 0;
            }
            if (message.hp != null && message.hasOwnProperty("hp"))
                object.hp = message.hp;
            if (message.posx != null && message.hasOwnProperty("posx"))
                object.posx = options.json && !isFinite(message.posx) ? String(message.posx) : message.posx;
            if (message.posy != null && message.hasOwnProperty("posy"))
                object.posy = options.json && !isFinite(message.posy) ? String(message.posy) : message.posy;
            return object;
        };

        /**
         * Converts this C2S_RoleInfo to JSON.
         * @function toJSON
         * @memberof protobuf.C2S_RoleInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_RoleInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return C2S_RoleInfo;
    })();

    protobuf.C2S_SendBullet = (function() {

        /**
         * Properties of a C2S_SendBullet.
         * @memberof protobuf
         * @interface IC2S_SendBullet
         * @property {string|null} [roleType] C2S_SendBullet roleType
         * @property {number|null} [shootType] C2S_SendBullet shootType
         */

        /**
         * Constructs a new C2S_SendBullet.
         * @memberof protobuf
         * @classdesc Represents a C2S_SendBullet.
         * @implements IC2S_SendBullet
         * @constructor
         * @param {protobuf.IC2S_SendBullet=} [properties] Properties to set
         */
        function C2S_SendBullet(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_SendBullet roleType.
         * @member {string} roleType
         * @memberof protobuf.C2S_SendBullet
         * @instance
         */
        C2S_SendBullet.prototype.roleType = "";

        /**
         * C2S_SendBullet shootType.
         * @member {number} shootType
         * @memberof protobuf.C2S_SendBullet
         * @instance
         */
        C2S_SendBullet.prototype.shootType = 0;

        /**
         * Creates a new C2S_SendBullet instance using the specified properties.
         * @function create
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {protobuf.IC2S_SendBullet=} [properties] Properties to set
         * @returns {protobuf.C2S_SendBullet} C2S_SendBullet instance
         */
        C2S_SendBullet.create = function create(properties) {
            return new C2S_SendBullet(properties);
        };

        /**
         * Encodes the specified C2S_SendBullet message. Does not implicitly {@link protobuf.C2S_SendBullet.verify|verify} messages.
         * @function encode
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {protobuf.IC2S_SendBullet} message C2S_SendBullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_SendBullet.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.roleType != null && Object.hasOwnProperty.call(message, "roleType"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.roleType);
            if (message.shootType != null && Object.hasOwnProperty.call(message, "shootType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.shootType);
            return writer;
        };

        /**
         * Encodes the specified C2S_SendBullet message, length delimited. Does not implicitly {@link protobuf.C2S_SendBullet.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {protobuf.IC2S_SendBullet} message C2S_SendBullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_SendBullet.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_SendBullet message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.C2S_SendBullet} C2S_SendBullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_SendBullet.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.C2S_SendBullet();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.roleType = reader.string();
                    break;
                case 2:
                    message.shootType = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_SendBullet message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.C2S_SendBullet} C2S_SendBullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_SendBullet.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_SendBullet message.
         * @function verify
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_SendBullet.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.roleType != null && message.hasOwnProperty("roleType"))
                if (!$util.isString(message.roleType))
                    return "roleType: string expected";
            if (message.shootType != null && message.hasOwnProperty("shootType"))
                if (!$util.isInteger(message.shootType))
                    return "shootType: integer expected";
            return null;
        };

        /**
         * Creates a C2S_SendBullet message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.C2S_SendBullet} C2S_SendBullet
         */
        C2S_SendBullet.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.C2S_SendBullet)
                return object;
            var message = new $root.protobuf.C2S_SendBullet();
            if (object.roleType != null)
                message.roleType = String(object.roleType);
            if (object.shootType != null)
                message.shootType = object.shootType | 0;
            return message;
        };

        /**
         * Creates a plain object from a C2S_SendBullet message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.C2S_SendBullet
         * @static
         * @param {protobuf.C2S_SendBullet} message C2S_SendBullet
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_SendBullet.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.roleType = "";
                object.shootType = 0;
            }
            if (message.roleType != null && message.hasOwnProperty("roleType"))
                object.roleType = message.roleType;
            if (message.shootType != null && message.hasOwnProperty("shootType"))
                object.shootType = message.shootType;
            return object;
        };

        /**
         * Converts this C2S_SendBullet to JSON.
         * @function toJSON
         * @memberof protobuf.C2S_SendBullet
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_SendBullet.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return C2S_SendBullet;
    })();

    protobuf.S2C_SendBullet = (function() {

        /**
         * Properties of a S2C_SendBullet.
         * @memberof protobuf
         * @interface IS2C_SendBullet
         * @property {protobuf.IBullet|null} [bullet] S2C_SendBullet bullet
         */

        /**
         * Constructs a new S2C_SendBullet.
         * @memberof protobuf
         * @classdesc Represents a S2C_SendBullet.
         * @implements IS2C_SendBullet
         * @constructor
         * @param {protobuf.IS2C_SendBullet=} [properties] Properties to set
         */
        function S2C_SendBullet(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_SendBullet bullet.
         * @member {protobuf.IBullet|null|undefined} bullet
         * @memberof protobuf.S2C_SendBullet
         * @instance
         */
        S2C_SendBullet.prototype.bullet = null;

        /**
         * Creates a new S2C_SendBullet instance using the specified properties.
         * @function create
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {protobuf.IS2C_SendBullet=} [properties] Properties to set
         * @returns {protobuf.S2C_SendBullet} S2C_SendBullet instance
         */
        S2C_SendBullet.create = function create(properties) {
            return new S2C_SendBullet(properties);
        };

        /**
         * Encodes the specified S2C_SendBullet message. Does not implicitly {@link protobuf.S2C_SendBullet.verify|verify} messages.
         * @function encode
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {protobuf.IS2C_SendBullet} message S2C_SendBullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_SendBullet.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.bullet != null && Object.hasOwnProperty.call(message, "bullet"))
                $root.protobuf.Bullet.encode(message.bullet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_SendBullet message, length delimited. Does not implicitly {@link protobuf.S2C_SendBullet.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {protobuf.IS2C_SendBullet} message S2C_SendBullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_SendBullet.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_SendBullet message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.S2C_SendBullet} S2C_SendBullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_SendBullet.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.S2C_SendBullet();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.bullet = $root.protobuf.Bullet.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_SendBullet message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.S2C_SendBullet} S2C_SendBullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_SendBullet.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_SendBullet message.
         * @function verify
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_SendBullet.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.bullet != null && message.hasOwnProperty("bullet")) {
                var error = $root.protobuf.Bullet.verify(message.bullet);
                if (error)
                    return "bullet." + error;
            }
            return null;
        };

        /**
         * Creates a S2C_SendBullet message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.S2C_SendBullet} S2C_SendBullet
         */
        S2C_SendBullet.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.S2C_SendBullet)
                return object;
            var message = new $root.protobuf.S2C_SendBullet();
            if (object.bullet != null) {
                if (typeof object.bullet !== "object")
                    throw TypeError(".protobuf.S2C_SendBullet.bullet: object expected");
                message.bullet = $root.protobuf.Bullet.fromObject(object.bullet);
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_SendBullet message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.S2C_SendBullet
         * @static
         * @param {protobuf.S2C_SendBullet} message S2C_SendBullet
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_SendBullet.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.bullet = null;
            if (message.bullet != null && message.hasOwnProperty("bullet"))
                object.bullet = $root.protobuf.Bullet.toObject(message.bullet, options);
            return object;
        };

        /**
         * Converts this S2C_SendBullet to JSON.
         * @function toJSON
         * @memberof protobuf.S2C_SendBullet
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_SendBullet.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return S2C_SendBullet;
    })();

    protobuf.S2C_RoleInfo = (function() {

        /**
         * Properties of a S2C_RoleInfo.
         * @memberof protobuf
         * @interface IS2C_RoleInfo
         * @property {Array.<protobuf.IEnemy>|null} [roleList] S2C_RoleInfo roleList
         */

        /**
         * Constructs a new S2C_RoleInfo.
         * @memberof protobuf
         * @classdesc Represents a S2C_RoleInfo.
         * @implements IS2C_RoleInfo
         * @constructor
         * @param {protobuf.IS2C_RoleInfo=} [properties] Properties to set
         */
        function S2C_RoleInfo(properties) {
            this.roleList = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_RoleInfo roleList.
         * @member {Array.<protobuf.IEnemy>} roleList
         * @memberof protobuf.S2C_RoleInfo
         * @instance
         */
        S2C_RoleInfo.prototype.roleList = $util.emptyArray;

        /**
         * Creates a new S2C_RoleInfo instance using the specified properties.
         * @function create
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {protobuf.IS2C_RoleInfo=} [properties] Properties to set
         * @returns {protobuf.S2C_RoleInfo} S2C_RoleInfo instance
         */
        S2C_RoleInfo.create = function create(properties) {
            return new S2C_RoleInfo(properties);
        };

        /**
         * Encodes the specified S2C_RoleInfo message. Does not implicitly {@link protobuf.S2C_RoleInfo.verify|verify} messages.
         * @function encode
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {protobuf.IS2C_RoleInfo} message S2C_RoleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_RoleInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.roleList != null && message.roleList.length)
                for (var i = 0; i < message.roleList.length; ++i)
                    $root.protobuf.Enemy.encode(message.roleList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_RoleInfo message, length delimited. Does not implicitly {@link protobuf.S2C_RoleInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {protobuf.IS2C_RoleInfo} message S2C_RoleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_RoleInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_RoleInfo message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.S2C_RoleInfo} S2C_RoleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_RoleInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.S2C_RoleInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    if (!(message.roleList && message.roleList.length))
                        message.roleList = [];
                    message.roleList.push($root.protobuf.Enemy.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_RoleInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.S2C_RoleInfo} S2C_RoleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_RoleInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_RoleInfo message.
         * @function verify
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_RoleInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.roleList != null && message.hasOwnProperty("roleList")) {
                if (!Array.isArray(message.roleList))
                    return "roleList: array expected";
                for (var i = 0; i < message.roleList.length; ++i) {
                    var error = $root.protobuf.Enemy.verify(message.roleList[i]);
                    if (error)
                        return "roleList." + error;
                }
            }
            return null;
        };

        /**
         * Creates a S2C_RoleInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.S2C_RoleInfo} S2C_RoleInfo
         */
        S2C_RoleInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.S2C_RoleInfo)
                return object;
            var message = new $root.protobuf.S2C_RoleInfo();
            if (object.roleList) {
                if (!Array.isArray(object.roleList))
                    throw TypeError(".protobuf.S2C_RoleInfo.roleList: array expected");
                message.roleList = [];
                for (var i = 0; i < object.roleList.length; ++i) {
                    if (typeof object.roleList[i] !== "object")
                        throw TypeError(".protobuf.S2C_RoleInfo.roleList: object expected");
                    message.roleList[i] = $root.protobuf.Enemy.fromObject(object.roleList[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_RoleInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.S2C_RoleInfo
         * @static
         * @param {protobuf.S2C_RoleInfo} message S2C_RoleInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_RoleInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.roleList = [];
            if (message.roleList && message.roleList.length) {
                object.roleList = [];
                for (var j = 0; j < message.roleList.length; ++j)
                    object.roleList[j] = $root.protobuf.Enemy.toObject(message.roleList[j], options);
            }
            return object;
        };

        /**
         * Converts this S2C_RoleInfo to JSON.
         * @function toJSON
         * @memberof protobuf.S2C_RoleInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_RoleInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return S2C_RoleInfo;
    })();

    protobuf.S2C_RoomInfo = (function() {

        /**
         * Properties of a S2C_RoomInfo.
         * @memberof protobuf
         * @interface IS2C_RoomInfo
         * @property {Array.<protobuf.IEnemy>|null} [enemyList] S2C_RoomInfo enemyList
         * @property {Array.<protobuf.IBullet>|null} [bulletList] S2C_RoomInfo bulletList
         */

        /**
         * Constructs a new S2C_RoomInfo.
         * @memberof protobuf
         * @classdesc Represents a S2C_RoomInfo.
         * @implements IS2C_RoomInfo
         * @constructor
         * @param {protobuf.IS2C_RoomInfo=} [properties] Properties to set
         */
        function S2C_RoomInfo(properties) {
            this.enemyList = [];
            this.bulletList = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_RoomInfo enemyList.
         * @member {Array.<protobuf.IEnemy>} enemyList
         * @memberof protobuf.S2C_RoomInfo
         * @instance
         */
        S2C_RoomInfo.prototype.enemyList = $util.emptyArray;

        /**
         * S2C_RoomInfo bulletList.
         * @member {Array.<protobuf.IBullet>} bulletList
         * @memberof protobuf.S2C_RoomInfo
         * @instance
         */
        S2C_RoomInfo.prototype.bulletList = $util.emptyArray;

        /**
         * Creates a new S2C_RoomInfo instance using the specified properties.
         * @function create
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {protobuf.IS2C_RoomInfo=} [properties] Properties to set
         * @returns {protobuf.S2C_RoomInfo} S2C_RoomInfo instance
         */
        S2C_RoomInfo.create = function create(properties) {
            return new S2C_RoomInfo(properties);
        };

        /**
         * Encodes the specified S2C_RoomInfo message. Does not implicitly {@link protobuf.S2C_RoomInfo.verify|verify} messages.
         * @function encode
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {protobuf.IS2C_RoomInfo} message S2C_RoomInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_RoomInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.enemyList != null && message.enemyList.length)
                for (var i = 0; i < message.enemyList.length; ++i)
                    $root.protobuf.Enemy.encode(message.enemyList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.bulletList != null && message.bulletList.length)
                for (var i = 0; i < message.bulletList.length; ++i)
                    $root.protobuf.Bullet.encode(message.bulletList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_RoomInfo message, length delimited. Does not implicitly {@link protobuf.S2C_RoomInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {protobuf.IS2C_RoomInfo} message S2C_RoomInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_RoomInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_RoomInfo message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.S2C_RoomInfo} S2C_RoomInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_RoomInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.S2C_RoomInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    if (!(message.enemyList && message.enemyList.length))
                        message.enemyList = [];
                    message.enemyList.push($root.protobuf.Enemy.decode(reader, reader.uint32()));
                    break;
                case 2:
                    if (!(message.bulletList && message.bulletList.length))
                        message.bulletList = [];
                    message.bulletList.push($root.protobuf.Bullet.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_RoomInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.S2C_RoomInfo} S2C_RoomInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_RoomInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_RoomInfo message.
         * @function verify
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_RoomInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.enemyList != null && message.hasOwnProperty("enemyList")) {
                if (!Array.isArray(message.enemyList))
                    return "enemyList: array expected";
                for (var i = 0; i < message.enemyList.length; ++i) {
                    var error = $root.protobuf.Enemy.verify(message.enemyList[i]);
                    if (error)
                        return "enemyList." + error;
                }
            }
            if (message.bulletList != null && message.hasOwnProperty("bulletList")) {
                if (!Array.isArray(message.bulletList))
                    return "bulletList: array expected";
                for (var i = 0; i < message.bulletList.length; ++i) {
                    var error = $root.protobuf.Bullet.verify(message.bulletList[i]);
                    if (error)
                        return "bulletList." + error;
                }
            }
            return null;
        };

        /**
         * Creates a S2C_RoomInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.S2C_RoomInfo} S2C_RoomInfo
         */
        S2C_RoomInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.S2C_RoomInfo)
                return object;
            var message = new $root.protobuf.S2C_RoomInfo();
            if (object.enemyList) {
                if (!Array.isArray(object.enemyList))
                    throw TypeError(".protobuf.S2C_RoomInfo.enemyList: array expected");
                message.enemyList = [];
                for (var i = 0; i < object.enemyList.length; ++i) {
                    if (typeof object.enemyList[i] !== "object")
                        throw TypeError(".protobuf.S2C_RoomInfo.enemyList: object expected");
                    message.enemyList[i] = $root.protobuf.Enemy.fromObject(object.enemyList[i]);
                }
            }
            if (object.bulletList) {
                if (!Array.isArray(object.bulletList))
                    throw TypeError(".protobuf.S2C_RoomInfo.bulletList: array expected");
                message.bulletList = [];
                for (var i = 0; i < object.bulletList.length; ++i) {
                    if (typeof object.bulletList[i] !== "object")
                        throw TypeError(".protobuf.S2C_RoomInfo.bulletList: object expected");
                    message.bulletList[i] = $root.protobuf.Bullet.fromObject(object.bulletList[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_RoomInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.S2C_RoomInfo
         * @static
         * @param {protobuf.S2C_RoomInfo} message S2C_RoomInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_RoomInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.enemyList = [];
                object.bulletList = [];
            }
            if (message.enemyList && message.enemyList.length) {
                object.enemyList = [];
                for (var j = 0; j < message.enemyList.length; ++j)
                    object.enemyList[j] = $root.protobuf.Enemy.toObject(message.enemyList[j], options);
            }
            if (message.bulletList && message.bulletList.length) {
                object.bulletList = [];
                for (var j = 0; j < message.bulletList.length; ++j)
                    object.bulletList[j] = $root.protobuf.Bullet.toObject(message.bulletList[j], options);
            }
            return object;
        };

        /**
         * Converts this S2C_RoomInfo to JSON.
         * @function toJSON
         * @memberof protobuf.S2C_RoomInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_RoomInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return S2C_RoomInfo;
    })();

    protobuf.C2S_RoleBulletHit = (function() {

        /**
         * Properties of a C2S_RoleBulletHit.
         * @memberof protobuf
         * @interface IC2S_RoleBulletHit
         * @property {number|null} [bulletUserId] C2S_RoleBulletHit bulletUserId
         * @property {number|null} [bulletShootType] C2S_RoleBulletHit bulletShootType
         * @property {number|null} [hitUserId] C2S_RoleBulletHit hitUserId
         */

        /**
         * Constructs a new C2S_RoleBulletHit.
         * @memberof protobuf
         * @classdesc Represents a C2S_RoleBulletHit.
         * @implements IC2S_RoleBulletHit
         * @constructor
         * @param {protobuf.IC2S_RoleBulletHit=} [properties] Properties to set
         */
        function C2S_RoleBulletHit(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_RoleBulletHit bulletUserId.
         * @member {number} bulletUserId
         * @memberof protobuf.C2S_RoleBulletHit
         * @instance
         */
        C2S_RoleBulletHit.prototype.bulletUserId = 0;

        /**
         * C2S_RoleBulletHit bulletShootType.
         * @member {number} bulletShootType
         * @memberof protobuf.C2S_RoleBulletHit
         * @instance
         */
        C2S_RoleBulletHit.prototype.bulletShootType = 0;

        /**
         * C2S_RoleBulletHit hitUserId.
         * @member {number} hitUserId
         * @memberof protobuf.C2S_RoleBulletHit
         * @instance
         */
        C2S_RoleBulletHit.prototype.hitUserId = 0;

        /**
         * Creates a new C2S_RoleBulletHit instance using the specified properties.
         * @function create
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {protobuf.IC2S_RoleBulletHit=} [properties] Properties to set
         * @returns {protobuf.C2S_RoleBulletHit} C2S_RoleBulletHit instance
         */
        C2S_RoleBulletHit.create = function create(properties) {
            return new C2S_RoleBulletHit(properties);
        };

        /**
         * Encodes the specified C2S_RoleBulletHit message. Does not implicitly {@link protobuf.C2S_RoleBulletHit.verify|verify} messages.
         * @function encode
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {protobuf.IC2S_RoleBulletHit} message C2S_RoleBulletHit message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_RoleBulletHit.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.bulletUserId != null && Object.hasOwnProperty.call(message, "bulletUserId"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.bulletUserId);
            if (message.bulletShootType != null && Object.hasOwnProperty.call(message, "bulletShootType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bulletShootType);
            if (message.hitUserId != null && Object.hasOwnProperty.call(message, "hitUserId"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.hitUserId);
            return writer;
        };

        /**
         * Encodes the specified C2S_RoleBulletHit message, length delimited. Does not implicitly {@link protobuf.C2S_RoleBulletHit.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {protobuf.IC2S_RoleBulletHit} message C2S_RoleBulletHit message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_RoleBulletHit.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_RoleBulletHit message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.C2S_RoleBulletHit} C2S_RoleBulletHit
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_RoleBulletHit.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.C2S_RoleBulletHit();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.bulletUserId = reader.int32();
                    break;
                case 2:
                    message.bulletShootType = reader.int32();
                    break;
                case 3:
                    message.hitUserId = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_RoleBulletHit message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.C2S_RoleBulletHit} C2S_RoleBulletHit
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_RoleBulletHit.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_RoleBulletHit message.
         * @function verify
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_RoleBulletHit.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.bulletUserId != null && message.hasOwnProperty("bulletUserId"))
                if (!$util.isInteger(message.bulletUserId))
                    return "bulletUserId: integer expected";
            if (message.bulletShootType != null && message.hasOwnProperty("bulletShootType"))
                if (!$util.isInteger(message.bulletShootType))
                    return "bulletShootType: integer expected";
            if (message.hitUserId != null && message.hasOwnProperty("hitUserId"))
                if (!$util.isInteger(message.hitUserId))
                    return "hitUserId: integer expected";
            return null;
        };

        /**
         * Creates a C2S_RoleBulletHit message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.C2S_RoleBulletHit} C2S_RoleBulletHit
         */
        C2S_RoleBulletHit.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.C2S_RoleBulletHit)
                return object;
            var message = new $root.protobuf.C2S_RoleBulletHit();
            if (object.bulletUserId != null)
                message.bulletUserId = object.bulletUserId | 0;
            if (object.bulletShootType != null)
                message.bulletShootType = object.bulletShootType | 0;
            if (object.hitUserId != null)
                message.hitUserId = object.hitUserId | 0;
            return message;
        };

        /**
         * Creates a plain object from a C2S_RoleBulletHit message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.C2S_RoleBulletHit
         * @static
         * @param {protobuf.C2S_RoleBulletHit} message C2S_RoleBulletHit
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_RoleBulletHit.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.bulletUserId = 0;
                object.bulletShootType = 0;
                object.hitUserId = 0;
            }
            if (message.bulletUserId != null && message.hasOwnProperty("bulletUserId"))
                object.bulletUserId = message.bulletUserId;
            if (message.bulletShootType != null && message.hasOwnProperty("bulletShootType"))
                object.bulletShootType = message.bulletShootType;
            if (message.hitUserId != null && message.hasOwnProperty("hitUserId"))
                object.hitUserId = message.hitUserId;
            return object;
        };

        /**
         * Converts this C2S_RoleBulletHit to JSON.
         * @function toJSON
         * @memberof protobuf.C2S_RoleBulletHit
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_RoleBulletHit.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return C2S_RoleBulletHit;
    })();

    protobuf.Bullet = (function() {

        /**
         * Properties of a Bullet.
         * @memberof protobuf
         * @interface IBullet
         * @property {number|null} [posx] Bullet posx
         * @property {number|null} [posy] Bullet posy
         * @property {string|null} [roleType] Bullet roleType
         * @property {number|null} [shootType] Bullet shootType
         * @property {number|null} [speed] Bullet speed
         * @property {number|Long|null} [id] Bullet id
         * @property {number|null} [hp] Bullet hp
         * @property {number|null} [userId] Bullet userId
         */

        /**
         * Constructs a new Bullet.
         * @memberof protobuf
         * @classdesc Represents a Bullet.
         * @implements IBullet
         * @constructor
         * @param {protobuf.IBullet=} [properties] Properties to set
         */
        function Bullet(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Bullet posx.
         * @member {number} posx
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.posx = 0;

        /**
         * Bullet posy.
         * @member {number} posy
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.posy = 0;

        /**
         * Bullet roleType.
         * @member {string} roleType
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.roleType = "";

        /**
         * Bullet shootType.
         * @member {number} shootType
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.shootType = 0;

        /**
         * Bullet speed.
         * @member {number} speed
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.speed = 0;

        /**
         * Bullet id.
         * @member {number|Long} id
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Bullet hp.
         * @member {number} hp
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.hp = 0;

        /**
         * Bullet userId.
         * @member {number} userId
         * @memberof protobuf.Bullet
         * @instance
         */
        Bullet.prototype.userId = 0;

        /**
         * Creates a new Bullet instance using the specified properties.
         * @function create
         * @memberof protobuf.Bullet
         * @static
         * @param {protobuf.IBullet=} [properties] Properties to set
         * @returns {protobuf.Bullet} Bullet instance
         */
        Bullet.create = function create(properties) {
            return new Bullet(properties);
        };

        /**
         * Encodes the specified Bullet message. Does not implicitly {@link protobuf.Bullet.verify|verify} messages.
         * @function encode
         * @memberof protobuf.Bullet
         * @static
         * @param {protobuf.IBullet} message Bullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Bullet.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.posx != null && Object.hasOwnProperty.call(message, "posx"))
                writer.uint32(/* id 1, wireType 5 =*/13).float(message.posx);
            if (message.posy != null && Object.hasOwnProperty.call(message, "posy"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.posy);
            if (message.roleType != null && Object.hasOwnProperty.call(message, "roleType"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.roleType);
            if (message.shootType != null && Object.hasOwnProperty.call(message, "shootType"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.shootType);
            if (message.speed != null && Object.hasOwnProperty.call(message, "speed"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.speed);
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 6, wireType 0 =*/48).int64(message.id);
            if (message.hp != null && Object.hasOwnProperty.call(message, "hp"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.hp);
            if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
                writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userId);
            return writer;
        };

        /**
         * Encodes the specified Bullet message, length delimited. Does not implicitly {@link protobuf.Bullet.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.Bullet
         * @static
         * @param {protobuf.IBullet} message Bullet message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Bullet.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Bullet message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.Bullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.Bullet} Bullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Bullet.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.Bullet();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.posx = reader.float();
                    break;
                case 2:
                    message.posy = reader.float();
                    break;
                case 3:
                    message.roleType = reader.string();
                    break;
                case 4:
                    message.shootType = reader.int32();
                    break;
                case 5:
                    message.speed = reader.int32();
                    break;
                case 6:
                    message.id = reader.int64();
                    break;
                case 7:
                    message.hp = reader.int32();
                    break;
                case 8:
                    message.userId = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Bullet message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.Bullet
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.Bullet} Bullet
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Bullet.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Bullet message.
         * @function verify
         * @memberof protobuf.Bullet
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Bullet.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.posx != null && message.hasOwnProperty("posx"))
                if (typeof message.posx !== "number")
                    return "posx: number expected";
            if (message.posy != null && message.hasOwnProperty("posy"))
                if (typeof message.posy !== "number")
                    return "posy: number expected";
            if (message.roleType != null && message.hasOwnProperty("roleType"))
                if (!$util.isString(message.roleType))
                    return "roleType: string expected";
            if (message.shootType != null && message.hasOwnProperty("shootType"))
                if (!$util.isInteger(message.shootType))
                    return "shootType: integer expected";
            if (message.speed != null && message.hasOwnProperty("speed"))
                if (!$util.isInteger(message.speed))
                    return "speed: integer expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
                    return "id: integer|Long expected";
            if (message.hp != null && message.hasOwnProperty("hp"))
                if (!$util.isInteger(message.hp))
                    return "hp: integer expected";
            if (message.userId != null && message.hasOwnProperty("userId"))
                if (!$util.isInteger(message.userId))
                    return "userId: integer expected";
            return null;
        };

        /**
         * Creates a Bullet message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.Bullet
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.Bullet} Bullet
         */
        Bullet.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.Bullet)
                return object;
            var message = new $root.protobuf.Bullet();
            if (object.posx != null)
                message.posx = Number(object.posx);
            if (object.posy != null)
                message.posy = Number(object.posy);
            if (object.roleType != null)
                message.roleType = String(object.roleType);
            if (object.shootType != null)
                message.shootType = object.shootType | 0;
            if (object.speed != null)
                message.speed = object.speed | 0;
            if (object.id != null)
                if ($util.Long)
                    (message.id = $util.Long.fromValue(object.id)).unsigned = false;
                else if (typeof object.id === "string")
                    message.id = parseInt(object.id, 10);
                else if (typeof object.id === "number")
                    message.id = object.id;
                else if (typeof object.id === "object")
                    message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
            if (object.hp != null)
                message.hp = object.hp | 0;
            if (object.userId != null)
                message.userId = object.userId | 0;
            return message;
        };

        /**
         * Creates a plain object from a Bullet message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.Bullet
         * @static
         * @param {protobuf.Bullet} message Bullet
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Bullet.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.posx = 0;
                object.posy = 0;
                object.roleType = "";
                object.shootType = 0;
                object.speed = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.id = options.longs === String ? "0" : 0;
                object.hp = 0;
                object.userId = 0;
            }
            if (message.posx != null && message.hasOwnProperty("posx"))
                object.posx = options.json && !isFinite(message.posx) ? String(message.posx) : message.posx;
            if (message.posy != null && message.hasOwnProperty("posy"))
                object.posy = options.json && !isFinite(message.posy) ? String(message.posy) : message.posy;
            if (message.roleType != null && message.hasOwnProperty("roleType"))
                object.roleType = message.roleType;
            if (message.shootType != null && message.hasOwnProperty("shootType"))
                object.shootType = message.shootType;
            if (message.speed != null && message.hasOwnProperty("speed"))
                object.speed = message.speed;
            if (message.id != null && message.hasOwnProperty("id"))
                if (typeof message.id === "number")
                    object.id = options.longs === String ? String(message.id) : message.id;
                else
                    object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
            if (message.hp != null && message.hasOwnProperty("hp"))
                object.hp = message.hp;
            if (message.userId != null && message.hasOwnProperty("userId"))
                object.userId = message.userId;
            return object;
        };

        /**
         * Converts this Bullet to JSON.
         * @function toJSON
         * @memberof protobuf.Bullet
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Bullet.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Bullet;
    })();

    protobuf.Enemy = (function() {

        /**
         * Properties of an Enemy.
         * @memberof protobuf
         * @interface IEnemy
         * @property {number|null} [posx] Enemy posx
         * @property {number|null} [posy] Enemy posy
         * @property {number|null} [dir] Enemy dir
         * @property {number|null} [speed] Enemy speed
         * @property {number|null} [type] Enemy type
         * @property {number|null} [hp] Enemy hp
         * @property {number|Long|null} [id] Enemy id
         */

        /**
         * Constructs a new Enemy.
         * @memberof protobuf
         * @classdesc Represents an Enemy.
         * @implements IEnemy
         * @constructor
         * @param {protobuf.IEnemy=} [properties] Properties to set
         */
        function Enemy(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Enemy posx.
         * @member {number} posx
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.posx = 0;

        /**
         * Enemy posy.
         * @member {number} posy
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.posy = 0;

        /**
         * Enemy dir.
         * @member {number} dir
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.dir = 0;

        /**
         * Enemy speed.
         * @member {number} speed
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.speed = 0;

        /**
         * Enemy type.
         * @member {number} type
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.type = 0;

        /**
         * Enemy hp.
         * @member {number} hp
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.hp = 0;

        /**
         * Enemy id.
         * @member {number|Long} id
         * @memberof protobuf.Enemy
         * @instance
         */
        Enemy.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new Enemy instance using the specified properties.
         * @function create
         * @memberof protobuf.Enemy
         * @static
         * @param {protobuf.IEnemy=} [properties] Properties to set
         * @returns {protobuf.Enemy} Enemy instance
         */
        Enemy.create = function create(properties) {
            return new Enemy(properties);
        };

        /**
         * Encodes the specified Enemy message. Does not implicitly {@link protobuf.Enemy.verify|verify} messages.
         * @function encode
         * @memberof protobuf.Enemy
         * @static
         * @param {protobuf.IEnemy} message Enemy message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Enemy.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.posx != null && Object.hasOwnProperty.call(message, "posx"))
                writer.uint32(/* id 1, wireType 5 =*/13).float(message.posx);
            if (message.posy != null && Object.hasOwnProperty.call(message, "posy"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.posy);
            if (message.dir != null && Object.hasOwnProperty.call(message, "dir"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dir);
            if (message.speed != null && Object.hasOwnProperty.call(message, "speed"))
                writer.uint32(/* id 4, wireType 5 =*/37).float(message.speed);
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
            if (message.hp != null && Object.hasOwnProperty.call(message, "hp"))
                writer.uint32(/* id 6, wireType 5 =*/53).float(message.hp);
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 7, wireType 0 =*/56).int64(message.id);
            return writer;
        };

        /**
         * Encodes the specified Enemy message, length delimited. Does not implicitly {@link protobuf.Enemy.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protobuf.Enemy
         * @static
         * @param {protobuf.IEnemy} message Enemy message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Enemy.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an Enemy message from the specified reader or buffer.
         * @function decode
         * @memberof protobuf.Enemy
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protobuf.Enemy} Enemy
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Enemy.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protobuf.Enemy();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.posx = reader.float();
                    break;
                case 2:
                    message.posy = reader.float();
                    break;
                case 3:
                    message.dir = reader.int32();
                    break;
                case 4:
                    message.speed = reader.float();
                    break;
                case 5:
                    message.type = reader.int32();
                    break;
                case 6:
                    message.hp = reader.float();
                    break;
                case 7:
                    message.id = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an Enemy message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protobuf.Enemy
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protobuf.Enemy} Enemy
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Enemy.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an Enemy message.
         * @function verify
         * @memberof protobuf.Enemy
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Enemy.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.posx != null && message.hasOwnProperty("posx"))
                if (typeof message.posx !== "number")
                    return "posx: number expected";
            if (message.posy != null && message.hasOwnProperty("posy"))
                if (typeof message.posy !== "number")
                    return "posy: number expected";
            if (message.dir != null && message.hasOwnProperty("dir"))
                if (!$util.isInteger(message.dir))
                    return "dir: integer expected";
            if (message.speed != null && message.hasOwnProperty("speed"))
                if (typeof message.speed !== "number")
                    return "speed: number expected";
            if (message.type != null && message.hasOwnProperty("type"))
                if (!$util.isInteger(message.type))
                    return "type: integer expected";
            if (message.hp != null && message.hasOwnProperty("hp"))
                if (typeof message.hp !== "number")
                    return "hp: number expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
                    return "id: integer|Long expected";
            return null;
        };

        /**
         * Creates an Enemy message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protobuf.Enemy
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protobuf.Enemy} Enemy
         */
        Enemy.fromObject = function fromObject(object) {
            if (object instanceof $root.protobuf.Enemy)
                return object;
            var message = new $root.protobuf.Enemy();
            if (object.posx != null)
                message.posx = Number(object.posx);
            if (object.posy != null)
                message.posy = Number(object.posy);
            if (object.dir != null)
                message.dir = object.dir | 0;
            if (object.speed != null)
                message.speed = Number(object.speed);
            if (object.type != null)
                message.type = object.type | 0;
            if (object.hp != null)
                message.hp = Number(object.hp);
            if (object.id != null)
                if ($util.Long)
                    (message.id = $util.Long.fromValue(object.id)).unsigned = false;
                else if (typeof object.id === "string")
                    message.id = parseInt(object.id, 10);
                else if (typeof object.id === "number")
                    message.id = object.id;
                else if (typeof object.id === "object")
                    message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from an Enemy message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protobuf.Enemy
         * @static
         * @param {protobuf.Enemy} message Enemy
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Enemy.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.posx = 0;
                object.posy = 0;
                object.dir = 0;
                object.speed = 0;
                object.type = 0;
                object.hp = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.id = options.longs === String ? "0" : 0;
            }
            if (message.posx != null && message.hasOwnProperty("posx"))
                object.posx = options.json && !isFinite(message.posx) ? String(message.posx) : message.posx;
            if (message.posy != null && message.hasOwnProperty("posy"))
                object.posy = options.json && !isFinite(message.posy) ? String(message.posy) : message.posy;
            if (message.dir != null && message.hasOwnProperty("dir"))
                object.dir = message.dir;
            if (message.speed != null && message.hasOwnProperty("speed"))
                object.speed = options.json && !isFinite(message.speed) ? String(message.speed) : message.speed;
            if (message.type != null && message.hasOwnProperty("type"))
                object.type = message.type;
            if (message.hp != null && message.hasOwnProperty("hp"))
                object.hp = options.json && !isFinite(message.hp) ? String(message.hp) : message.hp;
            if (message.id != null && message.hasOwnProperty("id"))
                if (typeof message.id === "number")
                    object.id = options.longs === String ? String(message.id) : message.id;
                else
                    object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
            return object;
        };

        /**
         * Converts this Enemy to JSON.
         * @function toJSON
         * @memberof protobuf.Enemy
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Enemy.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Enemy;
    })();

    return protobuf;
})();

module.exports = $root;
